package com.dot.service;

import java.util.List;

import org.springframework.cache.annotation.Cacheable;

import com.dot.vo.DwarfBookVo;
import com.dot.vo.DwarfPageVo;

public interface DwarfBookService {
	
	public void saveBook(DwarfBookVo book) throws Exception;
	
	@Cacheable(value="com:dot:service:getBookByParentCode:",key="#pCode")
	public List<DwarfBookVo> getBookByParentCode(String pCode) throws Exception;
	
	@Cacheable(value="com:dot:service:getPageByBookCode:",key="#bCode")
	public List<DwarfPageVo> getPageByBookCode(String bCode) throws Exception;
	
	
	public DwarfBookVo getBookByCode(String bCode) throws Exception;
	
	@Cacheable(value="com:dot:service:getRootBook")
	public List<DwarfBookVo> getRootBook() throws Exception;
	
}
